<?php
/**
 * 描述：企业商铺-主页。
 * @final
 */
final class Exec_Store_Index extends Exec_Store_Public
{
    public function Get()
    {
        #获取参数
        $account=parent::Get();
        
        #获取供应信息数据
        $supplies=DB::PGetRows('select * from supply where Account=? limit 0,8',array($account['Username']));
        foreach($supplies as $key=>$value)
        {
            $supplies[$key]['ThumbnailPath']=Config::PATH_RELATIVE_ATTACHMENT_SUPPLY.'/'.$supplies[$key]['ThumbnailPath'];
        }
        View::Assign('Supplies',$supplies);

        #获取采购信息数据
        $procurements=DB::PGetRows('select * from procurement where Account=? limit 0,8',array($account['Username']));
        foreach($procurements as $key=>$value)
        {
            $procurements[$key]['ThumbnailPath']=Config::PATH_RELATIVE_ATTACHMENT_SUPPLY.'/'.$procurements[$key]['ThumbnailPath'];
        }
        View::Assign('Procurements',$procurements);

        #渲染输出
        View::Display('store/index.tpl');
    }
}
?>